# -*-coding:utf-8-*-
def get_xy_uav(time):
    arr = [[31.93900086, 118.7900625], [31.93899968, 118.7900612], [31.93902547, 118.7899325],
           [31.93908865, 118.7899942], [31.93908879, 118.7899954], [31.93909048, 118.789996],
           [31.93904681, 118.7899809], [31.9390491, 118.7899806], [31.93904911, 118.789982],
           [31.93902003, 118.7900024], [31.93899804, 118.7899635], [31.938977, 118.7899836],
           [31.93897654, 118.7899813], [31.93894324, 118.7900339], [31.93894342, 118.7900363],
           [31.93898154, 118.7900674], [31.93898043, 118.790066], [31.93901216, 118.7900834],
           [31.93901449, 118.7900806], [31.93901629, 118.7900807], [31.93901757, 118.7900804],
           [31.93910172, 118.7900841], [31.93909334, 118.7900449], [31.93905777, 118.7900571],
           [31.93897618, 118.7900731], [31.9389744, 118.7900215], [31.93903246, 118.7900051],
           [31.93910322, 118.7899863], [31.93909713, 118.7899393]
           ]
    return arr[time]


def get_altitude(time):
    arr = [75.1, 75.5, 85.3, 83, 82.7, 82.7, 82.7, 82.7, 82.7, 82, 82.3, 82.7, 82.3, 82.3,
           82, 82.3, 82.7, 82.7, 82.7, 82.7, 82.7, 82.3, 82.7, 83, 82.7, 83.3, 82.7, 70.5, 70.9]  # 1ft(英尺) = 0.3048米
    return arr[time] * 0.3048


def get_attitude(time):
    # pitch roll yaw
    arr = [[1.4, -4.8, -95.9], [0.9, 0.9, -46.8], [-0.9, 1.9, -46], [3.5, -1.4, -122.7], [3.7, -1.9, -149.1],
           [0.1, -2.6, -168.3], [2, -2.7, -168.4], [-1.3, -3.2, 160.2], [-2.1, -2.7, 129.9], [-2.8, -2.5, 148.3],
           [-2.7, -3.7, 148.5], [-3, -0.5, 148.5], [-2.6, -0.4, 110.7], [-4.9, -0.6, 110.6], [-1, 1.1, 80.7],
           [0, 1.9, 80.6], [-0.3, 1, 52.1], [0.5, -0.9, 51.8], [-0.7, 1.8, 71.4], [-1.4, 1, 165.2],
           [-0.8, 0.2, -179.3], [-2.3, -0.9, -148.8], [2.1, -0.5, -101.2], [-0.9, -1.9, -101], [1.9, -1.2, -101.2],
           [2.1, -1.9, -101.2], [2.9, -1.5, -101.4], [-1.8, 1.1, -7.7], [-0.8, 1.1, -6.3]]

    return arr[time]


def get_PTZ_attitude(time):
    arr = [[-89.9, -87.7], [-90, -38.2], [-89.9, -38.1], [-90, -114.5], [-90, -140.9], [-89.9, -160.2],
           [-89.9, -160.2], [-89.9, 168.2], [-90, 138.1], [-89.9, 156.5], [-90, 156.5], [-89.9, 156.5],
           [-89.9, 118.7], [-89.9, 118.7], [-89.9, 88.8], [-90, 88.8], [-90, 60], [-89.9, 60], [-90, 79.4],
           [-90, 173.3], [-90, -171.3], [-89.9, -140.7], [-89.9, -93.1], [-90, -93.1], [-90, -93.1],
           [-89.9, -93.1], [-90, -93.1], [-90, 0.4], [-90, 1.6]]

    return arr[time]


def get_label_dir(time):
    s1 = 'exp' + str(16 + time)
    s2 = 'DJI_0' + str(102 + time * 2) + '.txt'
    target_path = 'flightData/images/10.28/' + s1 + '/labels/' + s2
    return target_path
